package com.cfs.po.sys;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

import com.cfs.po.Vo;
/**
 *	组织
 *	@author wang.yujie
 * 	@since 2012-12-23
 *	@version 1.0
 */
@XmlRootElement(name="Org")
public class Org  extends Vo{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8152420659262877615L;

	/**
	 * id
	 */
	private Long id;
	
	/**
	 * 父id
	 */
	private Long parentId;
	
	/**
	 * 编号
	 */
	private String orgCode;
	
	/**
	 * 状态
	 */
	private Integer state;
	
	/**
	 * 级别
	 */
	private Integer levels;
	
	/**
	 * 名称
	 */
	private String name;
	
	/**
	 * 地址
	 */
	private String address;
	
	/**
	 * 描述
	 */
	private String description;
	
	private List<Org> subOrgs = new LinkedList<Org>();

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getLevels() {
		return levels;
	}

	public void setLevels(Integer levels) {
		this.levels = levels;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Org> getSubOrgs() {
		return subOrgs;
	}

	public void setSubOrgs(List<Org> subOrgs) {
		this.subOrgs = subOrgs;
	}
	
	public void addSub(Org org) {
		this.subOrgs.add(org);
	}
	
	public void removeSub(Org org) {
		this.subOrgs.remove(org);
	}

}
